<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>夏季清仓大促 - 促销详情</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #ff4d4f;
            --primary-light: #ff7a7a;
            --secondary: #1890ff;
            --success: #52c41a;
            --text-primary: #333333;
            --text-secondary: #666666;
            --text-tertiary: #999999;
            --bg-light: #f5f5f5;
            --bg-white: #ffffff;
            --border-light: #eeeeee;
            --radius: 8px;
            --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 60px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }
        
        .nav-title {
            font-size: 18px;
            font-weight: 600;
            text-align: center;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .nav-btn {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 20px;
        }
        
        .nav-btn.primary {
            color: var(--primary);
        }
        
        /* 店铺信息 */
        .store-header {
            background-color: var(--bg-white);
            padding: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .store-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            overflow: hidden;
            flex-shrink: 0;
        }
        
        .store-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .store-info {
            flex: 1;
        }
        
        .store-name {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 4px;
        }
        
        .store-rating {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: var(--text-tertiary);
        }
        
        .rating-stars {
            color: #faad14;
        }
        
        .follow-btn {
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            border: 1px solid var(--primary);
            color: var(--primary);
            background-color: transparent;
            white-space: nowrap;
        }
        
        .follow-btn.following {
            background-color: var(--primary);
            color: white;
        }
        
        /* 促销图片展示 */
        .promotion-gallery {
            position: relative;
            background-color: black;
        }
        
        .gallery-image {
            width: 100%;
            display: block;
        }
        
        .gallery-count {
            position: absolute;
            top: 12px;
            right: 12px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 12px;
            padding: 3px 8px;
            border-radius: 12px;
        }
        
        /* 促销内容 */
        .promotion-content {
            background-color: var(--bg-white);
            padding: 16px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .promotion-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 12px;
            line-height: 1.4;
        }
        
        .promotion-description {
            font-size: 15px;
            line-height: 1.6;
            color: var(--text-primary);
            margin-bottom: 16px;
        }
        
        .promotion-description .highlight {
            color: var(--primary);
            font-weight: 500;
        }
        
        .promotion-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 16px;
        }
        
        .meta-tag {
            padding: 4px 12px;
            border-radius: 4px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .tag-discount {
            background-color: rgba(255, 77, 79, 0.1);
            color: var(--primary);
            border: 1px solid var(--primary);
        }
        
        .tag-time {
            background-color: rgba(24, 144, 255, 0.1);
            color: var(--secondary);
            border: 1px solid var(--secondary);
        }
        
        .tag-location {
            background-color: rgba(82, 196, 26, 0.1);
            color: var(--success);
            border: 1px solid var(--success);
        }
        
        /* 倒计时 */
        .countdown-container {
            background-color: rgba(255, 77, 79, 0.05);
            padding: 12px 16px;
            border-radius: var(--radius);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .countdown-label {
            font-size: 14px;
            color: var(--primary);
            font-weight: 500;
        }
        
        .countdown {
            display: flex;
            align-items: center;
            gap: 6px;
            flex: 1;
        }
        
        .countdown-value {
            background-color: var(--primary);
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 15px;
        }
        
        .countdown-separator {
            color: var(--primary);
            font-weight: 600;
        }
        
        .countdown-text {
            font-size: 12px;
            color: var(--primary);
        }
        
        /* 促销详情 */
        .detail-section {
            background-color: var(--bg-white);
            padding: 16px;
            margin-bottom: 10px;
        }
        
        .detail-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .detail-title i {
            color: var(--primary);
        }
        
        .detail-content {
            font-size: 15px;
            line-height: 1.6;
        }
        
        .detail-content p {
            margin-bottom: 12px;
        }
        
        .detail-content img {
            width: 100%;
            border-radius: var(--radius);
            margin: 10px 0;
        }
        
        .terms-list {
            padding-left: 20px;
            margin-bottom: 12px;
        }
        
        .terms-list li {
            margin-bottom: 8px;
            font-size: 14px;
            line-height: 1.5;
        }
        
        /* 商品列表 */
        .product-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        
        .product-item {
            border-radius: var(--radius);
            overflow: hidden;
            background-color: var(--bg-white);
            box-shadow: var(--shadow);
            text-decoration: none;
            color: var(--text-primary);
        }
        
        .product-image {
            width: 100%;
            height: 140px;
            object-fit: cover;
            display: block;
        }
        
        .product-info {
            padding: 10px;
        }
        
        .product-name {
            font-size: 14px;
            line-height: 1.3;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .product-price {
            display: flex;
            align-items: baseline;
            gap: 6px;
        }
        
        .current-price {
            font-size: 16px;
            font-weight: 600;
            color: var(--primary);
        }
        
        .original-price {
            font-size: 12px;
            color: var(--text-tertiary);
            text-decoration: line-through;
        }
        
        .product-tag {
            display: inline-block;
            margin-top: 6px;
            padding: 2px 6px;
            font-size: 11px;
            color: var(--primary);
            background-color: rgba(255, 77, 79, 0.1);
            border-radius: 2px;
        }
        
        /* 操作按钮区 */
        .action-bar {
            background-color: var(--bg-white);
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-top: 1px solid var(--border-light);
            border-bottom: 1px solid var(--border-light);
        }
        
        .action-button {
            flex: 1;
            padding: 10px 0;
            border-radius: var(--radius);
            font-size: 15px;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s ease;
        }
        
        .primary-action {
            background-color: var(--primary);
            color: white;
            border: none;
        }
        
        .secondary-action {
            background-color: white;
            color: var(--primary);
            border: 1px solid var(--primary);
        }
        
        /* 互动数据 */
        .interaction-stats {
            background-color: var(--bg-white);
            padding: 12px 16px;
            display: flex;
            justify-content: space-around;
            border-bottom: 1px solid var(--border-light);
        }
        
        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }
        
        .stat-value {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .stat-label {
            font-size: 12px;
            color: var(--text-tertiary);
        }
        
        /* 评论区 */
        .comments-section {
            background-color: var(--bg-white);
            margin-bottom: 70px;
        }
        
        .comments-header {
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-light);
        }
        
        .comments-title {
            font-size: 16px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .comments-count {
            color: var(--primary);
        }
        
        .sort-comments {
            font-size: 14px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 4px;
            background: none;
            border: none;
        }
        
        .comment-item {
            padding: 16px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .comment-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        
        .comment-user {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            overflow: hidden;
        }
        
        .user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .user-name {
            font-size: 14px;
            font-weight: 500;
        }
        
        .comment-time {
            font-size: 12px;
            color: var(--text-tertiary);
            display: flex;
            align-items: center;
        }
        
        .comment-content {
            font-size: 15px;
            line-height: 1.5;
            margin-bottom: 10px;
        }
        
        .comment-images {
            display: flex;
            gap: 6px;
            margin-bottom: 10px;
            overflow-x: auto;
            padding-bottom: 4px;
        }
        
        .comment-image {
            width: 80px;
            height: 80px;
            border-radius: 4px;
            flex-shrink: 0;
            overflow: hidden;
        }
        
        .comment-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .comment-actions {
            display: flex;
            gap: 16px;
        }
        
        .comment-action {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 13px;
            color: var(--text-tertiary);
            background: none;
            border: none;
        }
        
        .comment-action.liked {
            color: var(--primary);
        }
        
        /* 回复区 */
        .replies-container {
            background-color: var(--bg-light);
            border-radius: var(--radius);
            padding: 12px;
            margin-top: 10px;
        }
        
        .reply-item {
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .reply-item:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }
        
        .reply-header {
            display: flex;
            margin-bottom: 6px;
        }
        
        .reply-user {
            font-size: 13px;
            font-weight: 500;
            margin-right: 8px;
        }
        
        .reply-to {
            font-size: 13px;
            color: var(--text-tertiary);
        }
        
        .reply-content {
            font-size: 13px;
            line-height: 1.5;
            margin-bottom: 6px;
        }
        
        .reply-actions {
            display: flex;
            gap: 16px;
        }
        
        .reply-action {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: var(--text-tertiary);
            background: none;
            border: none;
        }
        
        /* 评论输入框 */
        .comment-input-container {
            position: fixed;
            bottom: 60px;
            left: 0;
            right: 0;
            background-color: var(--bg-white);
            padding: 10px 16px;
            border-top: 1px solid var(--border-light);
            z-index: 900;
        }
        
        .comment-input-wrapper {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .comment-input {
            flex: 1;
            padding: 10px 12px;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-light);
            font-size: 14px;
            resize: none;
            height: 40px;
            line-height: 20px;
        }
        
        .comment-input:focus {
            outline: none;
            border-color: var(--primary);
            background-color: white;
        }
        
        .input-actions {
            display: flex;
            gap: 10px;
        }
        
        .input-action {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
        }
        
        .send-comment {
            padding: 6px 14px;
            border-radius: 16px;
            background-color: var(--primary);
            color: white;
            border: none;
            font-size: 14px;
            font-weight: 500;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-tertiary);
            font-size: 11px;
            gap: 4px;
            text-decoration: none;
            flex: 1;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        .nav-icon {
            font-size: 20px;
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            bottom: 130px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 14px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
        
        /* 加载更多 */
        .load-more {
            padding: 16px;
            text-align: center;
        }
        
        .load-more-btn {
            padding: 8px 24px;
            border-radius: 20px;
            background-color: var(--bg-white);
            border: 1px solid var(--border-light);
            color: var(--text-secondary);
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin: 0 auto;
        }
        
        .load-more-btn.loading {
            color: var(--text-tertiary);
        }
        
        .load-more-btn.loading i {
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* 展开/收起按钮 */
        .toggle-content {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--secondary);
            background: none;
            border: none;
            font-size: 14px;
            margin: 8px auto 0;
        }
        
        /* 图片查看器 */
        .image-viewer {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: black;
            z-index: 2000;
            display: none;
            justify-content: center;
            align-items: center;
        }
        
        .image-viewer.active {
            display: flex;
        }
        
        .viewer-image {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        
        .close-viewer {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }
        
        .viewer-count {
            position: absolute;
            top: 16px;
            left: 16px;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            font-size: 14px;
            padding: 4px 10px;
            border-radius: 12px;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-btn" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">促销详情</div>
        <button class="nav-btn" id="shareBtn">
            <i class="fas fa-share-alt"></i>
        </button>
    </div>
    
    <!-- 店铺信息 -->
    <div class="store-header">
        <div class="store-avatar">
            <img src="https://picsum.photos/id/237/100/100" alt="店铺头像">
        </div>
        <div class="store-info">
            <div class="store-name">时尚服饰旗舰店</div>
            <div class="store-rating">
                <div class="rating-stars">
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star-half-alt"></i>
                </div>
                <span>4.8</span>
                <span>|</span>
                <span>12.5万粉丝</span>
            </div>
        </div>
        <button class="follow-btn" id="followBtn">
            <i class="far fa-plus"></i>
            <span>关注</span>
        </button>
    </div>
    
    <!-- 促销图片展示 -->
    <div class="promotion-gallery" id="promotionGallery">
        <img src="https://picsum.photos/id/64/1000/800" alt="夏季清仓大促" class="gallery-image" id="mainImage">
        <div class="gallery-count">1/5</div>
    </div>
    
    <!-- 促销内容 -->
    <div class="promotion-content">
        <h1 class="promotion-title">夏季清仓大促！全场3折起，满300减50，满500减100</h1>
        
        <div class="promotion-description">
            夏季商品清仓处理，<span class="highlight">全场3折起</span>！夏季T恤、短裤、连衣裙、凉鞋等一应俱全。更有满减活动：满300减50，满500减100，满1000减250！活动仅限3天，先到先得，错过再等一年！
            <br><br>
            新老会员均可参与，会员额外享受95折优惠，可与满减活动叠加使用！
        </div>
        
        <div class="promotion-meta">
            <div class="meta-tag tag-discount">
                <i class="fas fa-tag"></i>
                <span>3折起</span>
            </div>
            <div class="meta-tag tag-discount">
                <i class="fas fa-percent"></i>
                <span>满减活动</span>
            </div>
            <div class="meta-tag tag-time">
                <i class="far fa-calendar"></i>
                <span>2023-08-15至2023-08-17</span>
            </div>
            <div class="meta-tag tag-location">
                <i class="fas fa-map-marker-alt"></i>
                <span>线上线下同步</span>
            </div>
        </div>
        
        <div class="countdown-container">
            <div class="countdown-label">距离活动结束：</div>
            <div class="countdown">
                <div class="countdown-value" id="countdownDays">2</div>
                <span class="countdown-text">天</span>
                <span class="countdown-separator">:</span>
                <div class="countdown-value" id="countdownHours">18</div>
                <span class="countdown-text">时</span>
                <span class="countdown-separator">:</span>
                <div class="countdown-value" id="countdownMinutes">45</div>
                <span class="countdown-text">分</span>
                <span class="countdown-separator">:</span>
                <div class="countdown-value" id="countdownSeconds">33</div>
                <span class="countdown-text">秒</span>
            </div>
        </div>
    </div>
    
    <!-- 促销详情 -->
    <div class="detail-section">
        <div class="detail-title">
            <i class="fas fa-info-circle"></i>
            <span>活动详情</span>
        </div>
        <div class="detail-content" id="detailContent">
            <p>本次夏季清仓大促活动涵盖以下商品类别：</p>
            <ul class="terms-list">
                <li>夏季T恤、衬衫、POLO衫</li>
                <li>短裤、休闲裤、牛仔裤</li>
                <li>连衣裙、半身裙、套装</li>
                <li>凉鞋、拖鞋、帆布鞋</li>
                <li>太阳镜、帽子等配饰</li>
            </ul>
            
            <p>满减规则：</p>
            <ul class="terms-list">
                <li>满300元减50元</li>
                <li>满500元减100元</li>
                <li>满1000元减250元</li>
                <li>会员额外95折，可与满减叠加</li>
            </ul>
            
            <p>活动说明：</p>
            <ul class="terms-list">
                <li>活动时间：2023年8月15日00:00至2023年8月17日23:59</li>
                <li>线上线下同步进行，线上订单48小时内发货</li>
                <li>特价商品不参与本次活动，具体以商品详情页为准</li>
                <li>本次活动最终解释权归本店所有</li>
            </ul>
            
            <img src="https://picsum.photos/id/21/800/400" alt="活动宣传图">
            <img src="https://picsum.photos/id/26/800/400" alt="活动商品展示">
        </div>
        <button class="toggle-content" id="toggleDetail">
            <span>收起</span>
            <i class="fas fa-chevron-up"></i>
        </button>
    </div>
    
    <!-- 参与商品 -->
    <div class="detail-section">
        <div class="detail-title">
            <i class="fas fa-shopping-bag"></i>
            <span>参与活动商品</span>
        </div>
        <div class="product-list">
            <a href="#" class="product-item">
                <img src="https://picsum.photos/id/96/300/300" alt="夏季短袖T恤" class="product-image">
                <div class="product-info">
                    <div class="product-name">夏季纯棉短袖T恤 多色可选</div>
                    <div class="product-price">
                        <span class="current-price">¥59</span>
                        <span class="original-price">¥129</span>
                    </div>
                    <span class="product-tag">4.6折</span>
                </div>
            </a>
            <a href="#" class="product-item">
                <img src="https://picsum.photos/id/65/300/300" alt="休闲牛仔短裤" class="product-image">
                <div class="product-info">
                    <div class="product-name">夏季休闲牛仔短裤 宽松版型</div>
                    <div class="product-price">
                        <span class="current-price">¥79</span>
                        <span class="original-price">¥199</span>
                    </div>
                    <span class="product-tag">4.0折</span>
                </div>
            </a>
            <a href="#" class="product-item">
                <img src="https://picsum.photos/id/62/300/300" alt="时尚连衣裙" class="product-image">
                <div class="product-info">
                    <div class="product-name">夏季时尚碎花连衣裙 收腰显瘦</div>
                    <div class="product-price">
                        <span class="current-price">¥129</span>
                        <span class="original-price">¥299</span>
                    </div>
                    <span class="product-tag">4.3折</span>
                </div>
            </a>
            <a href="#" class="product-item">
                <img src="https://picsum.photos/id/61/300/300" alt="透气帆布鞋" class="product-image">
                <div class="product-info">
                    <div class="product-name">夏季透气帆布鞋 男女同款</div>
                    <div class="product-price">
                        <span class="current-price">¥69</span>
                        <span class="original-price">¥159</span>
                    </div>
                    <span class="product-tag">4.3折</span>
                </div>
            </a>
        </div>
        <button class="toggle-content" id="toggleProducts">
            <span>查看更多</span>
            <i class="fas fa-chevron-down"></i>
        </button>
    </div>
    
    <!-- 操作按钮区 -->
    <div class="action-bar">
        <button class="action-button secondary-action" id="collectBtn">
            <i class="far fa-bookmark"></i>
            <span>收藏</span>
        </button>
        <button class="action-button secondary-action" id="couponBtn">
            <i class="fas fa-ticket-alt"></i>
            <span>领券</span>
        </button>
        <button class="action-button primary-action" id="enterStoreBtn">
            <i class="fas fa-shopping-cart"></i>
            <span>进店选购</span>
        </button>
    </div>
    
    <!-- 互动数据 -->
    <div class="interaction-stats">
        <div class="stat-item">
            <div class="stat-value" id="likeCount">1258</div>
            <div class="stat-label">点赞</div>
        </div>
        <div class="stat-item">
            <div class="stat-value" id="commentCount">236</div>
            <div class="stat-label">评论</div>
        </div>
        <div class="stat-item">
            <div class="stat-value" id="shareCount">512</div>
            <div class="stat-label">分享</div>
        </div>
        <div class="stat-item">
            <div class="stat-value" id="participantCount">3.2万</div>
            <div class="stat-label">参与</div>
        </div>
    </div>
    
    <!-- 评论区 -->
    <div class="comments-section">
        <div class="comments-header">
            <div class="comments-title">
                <i class="fas fa-comments"></i>
                <span>用户评论</span>
                <span class="comments-count">(236)</span>
            </div>
            <button class="sort-comments" id="sortCommentsBtn">
                <span>最新</span>
                <i class="fas fa-chevron-down"></i>
            </button>
        </div>
        
        <!-- 评论项1 -->
        <div class="comment-item">
            <div class="comment-header">
                <div class="comment-user">
                    <div class="user-avatar">
                        <img src="https://picsum.photos/id/64/100/100" alt="用户头像">
                    </div>
                    <div class="user-name">时尚达人小A</div>
                </div>
                <div class="comment-time">2小时前</div>
            </div>
            <div class="comment-content">
                昨天买了两件T恤，质量很好，价格也很实惠！比平时便宜了一半多，这个活动太给力了！推荐大家赶紧入手~
            </div>
            <div class="comment-images">
                <div class="comment-image">
                    <img src="https://picsum.photos/id/21/100/100" alt="评论图片">
                </div>
                <div class="comment-image">
                    <img src="https://picsum.photos/id/22/100/100" alt="评论图片">
                </div>
            </div>
            <div class="comment-actions">
                <button class="comment-action like-comment" data-id="1">
                    <i class="far fa-heart"></i>
                    <span>48</span>
                </button>
                <button class="comment-action reply-comment" data-id="1">
                    <i class="far fa-comment"></i>
                    <span>回复</span>
                </button>
            </div>
            
            <!-- 回复区 -->
            <div class="replies-container">
                <div class="reply-item">
                    <div class="reply-header">
                        <div class="reply-user">时尚服饰旗舰店</div>
                        <div class="reply-to">回复 时尚达人小A</div>
                    </div>
                    <div class="reply-content">
                        感谢亲的支持与认可！我们会继续努力提供更多优质商品和优惠活动~
                    </div>
                    <div class="reply-actions">
                        <button class="reply-action like-reply" data-id="1-1">
                            <i class="far fa-heart"></i>
                            <span>12</span>
                        </button>
                        <button class="reply-action reply-reply" data-id="1-1" data-to="时尚服饰旗舰店">
                            <i class="far fa-comment"></i>
                            <span>回复</span>
                        </button>
                    </div>
                </div>
                <div class="reply-item">
                    <div class="reply-header">
                        <div class="reply-user">夏日么么茶</div>
                        <div class="reply-to">回复 时尚达人小A</div>
                    </div>
                    <div class="reply-content">
                        请问T恤尺码标准吗？我平时穿M码，这个需要选大一点吗？
                    </div>
                    <div class="reply-actions">
                        <button class="reply-action like-reply" data-id="1-2">
                            <i class="far fa-heart"></i>
                            <span>3</span>
                        </button>
                        <button class="reply-action reply-reply" data-id="1-2" data-to="夏日么么茶">
                            <i class="far fa-comment"></i>
                            <span>回复</span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 评论项2 -->
        <div class="comment-item">
            <div class="comment-header">
                <div class="comment-user">
                    <div class="user-avatar">
                        <img src="https://picsum.photos/id/91/100/100" alt="用户头像">
                    </div>
                    <div class="user-name">购物小能手</div>
                </div>
                <div class="comment-time">5小时前</div>
            </div>
            <div class="comment-content">
                满减活动很划算，买了5件才花了300多，比平时省了不少钱。物流也很快，昨天下单今天就收到了，满意！
            </div>
            <div class="comment-actions">
                <button class="comment-action like-comment" data-id="2">
                    <i class="far fa-heart"></i>
                    <span>32</span>
                </button>
                <button class="comment-action reply-comment" data-id="2">
                    <i class="far fa-comment"></i>
                    <span>回复</span>
                </button>
            </div>
        </div>
        
        <!-- 评论项3 -->
        <div class="comment-item">
            <div class="comment-header">
                <div class="comment-user">
                    <div class="user-avatar">
                        <img src="https://picsum.photos/id/25/100/100" alt="用户头像">
                    </div>
                    <div class="user-name">省钱达人</div>
                </div>
                <div class="comment-time">昨天 18:30</div>
            </div>
            <div class="comment-content">
                作为老会员，叠加会员折扣真的太划算了！希望店家以后多搞点这种活动，会一直支持的！
            </div>
            <div class="comment-images">
                <div class="comment-image">
                    <img src="https://picsum.photos/id/24/100/100" alt="评论图片">
                </div>
            </div>
            <div class="comment-actions">
                <button class="comment-action like-comment liked" data-id="3">
                    <i class="fas fa-heart"></i>
                    <span>67</span>
                </button>
                <button class="comment-action reply-comment" data-id="3">
                    <i class="far fa-comment"></i>
                    <span>回复</span>
                </button>
            </div>
        </div>
        
        <!-- 加载更多评论 -->
        <div class="load-more">
            <button class="load-more-btn" id="loadMoreComments">
                <span>加载更多评论</span>
                <i class="fas fa-chevron-down"></i>
            </button>
        </div>
    </div>
    
    <!-- 评论输入框 -->
    <div class="comment-input-container">
        <div class="comment-input-wrapper">
            <textarea class="comment-input" placeholder="发表你的看法..." id="commentInput"></textarea>
            <div class="input-actions">
                <button class="input-action" id="imageCommentBtn">
                    <i class="far fa-image"></i>
                </button>
                <button class="input-action" id="emojiCommentBtn">
                    <i class="far fa-smile"></i>
                </button>
                <button class="send-comment" id="sendCommentBtn">发送</button>
            </div>
        </div>
    </div>
    
    <!-- 图片查看器 -->
    <div class="image-viewer" id="imageViewer">
        <button class="close-viewer" id="closeViewer">
            <i class="fas fa-times"></i>
        </button>
        <div class="viewer-count" id="viewerCount">1/5</div>
        <img src="https://picsum.photos/id/64/1000/800" alt="图片查看" class="viewer-image" id="viewerImage">
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item">
            <i class="fas fa-home nav-icon"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item active">
            <i class="fas fa-tag nav-icon"></i>
            <span>促销</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-shopping-cart nav-icon"></i>
            <span>购物车</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-user nav-icon"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- 提示消息 -->
    <div class="toast" id="toast"></div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // DOM元素
        const backBtn = document.getElementById('backBtn');
        const shareBtn = document.getElementById('shareBtn');
        const followBtn = document.getElementById('followBtn');
        const collectBtn = document.getElementById('collectBtn');
        const couponBtn = document.getElementById('couponBtn');
        const enterStoreBtn = document.getElementById('enterStoreBtn');
        const toggleDetailBtn = document.getElementById('toggleDetail');
        const detailContent = document.getElementById('detailContent');
        const toggleProductsBtn = document.getElementById('toggleProducts');
        const sortCommentsBtn = document.getElementById('sortCommentsBtn');
        const loadMoreCommentsBtn = document.getElementById('loadMoreComments');
        const commentInput = document.getElementById('commentInput');
        const sendCommentBtn = document.getElementById('sendCommentBtn');
        const imageCommentBtn = document.getElementById('imageCommentBtn');
        const emojiCommentBtn = document.getElementById('emojiCommentBtn');
        const likeCountEl = document.getElementById('likeCount');
        const commentCountEl = document.getElementById('commentCount');
        const shareCountEl = document.getElementById('shareCount');
        const toast = document.getElementById('toast');
        const promotionGallery = document.getElementById('promotionGallery');
        const mainImage = document.getElementById('mainImage');
        const imageViewer = document.getElementById('imageViewer');
        const viewerImage = document.getElementById('viewerImage');
        const viewerCount = document.getElementById('viewerCount');
        const closeViewer = document.getElementById('closeViewer');
        
        // 倒计时元素
        const countdownDays = document.getElementById('countdownDays');
        const countdownHours = document.getElementById('countdownHours');
        const countdownMinutes = document.getElementById('countdownMinutes');
        const countdownSeconds = document.getElementById('countdownSeconds');
        
        // 图片数据
        const galleryImages = [
            'https://picsum.photos/id/64/1000/800',
            'https://picsum.photos/id/65/1000/800',
            'https://picsum.photos/id/62/1000/800',
            'https://picsum.photos/id/61/1000/800',
            'https://picsum.photos/id/26/1000/800'
        ];
        let currentImageIndex = 0;
        
        // 返回按钮
        backBtn.addEventListener('click', () => {
            history.back();
        });
        
        // 关注按钮
        followBtn.addEventListener('click', () => {
            if (followBtn.classList.contains('following')) {
                followBtn.classList.remove('following');
                followBtn.innerHTML = '<i class="far fa-plus"></i><span>关注</span>';
                showToast('已取消关注');
            } else {
                followBtn.classList.add('following');
                followBtn.innerHTML = '<i class="fas fa-check"></i><span>已关注</span>';
                showToast('关注成功');
            }
        });
        
        // 收藏按钮
        collectBtn.addEventListener('click', () => {
            const icon = collectBtn.querySelector('i');
            if (icon.classList.contains('far')) {
                icon.classList.remove('far');
                icon.classList.add('fas');
                collectBtn.innerHTML = '<i class="fas fa-bookmark"></i><span>已收藏</span>';
                showToast('收藏成功');
            } else {
                icon.classList.remove('fas');
                icon.classList.add('far');
                collectBtn.innerHTML = '<i class="far fa-bookmark"></i><span>收藏</span>';
                showToast('已取消收藏');
            }
        });
        
        // 领券按钮
        couponBtn.addEventListener('click', () => {
            showToast('成功领取满300减50优惠券');
        });
        
        // 进店选购按钮
        enterStoreBtn.addEventListener('click', () => {
            showToast('进入店铺首页');
        });
        
        // 分享按钮
        shareBtn.addEventListener('click', () => {
            let shareCount = parseInt(shareCountEl.textContent);
            shareCountEl.textContent = shareCount + 1;
            showToast('分享成功');
        });
        
        // 展开/收起详情
        let detailExpanded = true;
        toggleDetailBtn.addEventListener('click', () => {
            detailExpanded = !detailExpanded;
            if (detailExpanded) {
                detailContent.style.maxHeight = 'none';
                toggleDetailBtn.innerHTML = '<span>收起</span><i class="fas fa-chevron-up"></i>';
            } else {
                detailContent.style.maxHeight = '150px';
                detailContent.style.overflow = 'hidden';
                toggleDetailBtn.innerHTML = '<span>展开</span><i class="fas fa-chevron-down"></i>';
            }
        });
        
        // 展开/收起商品列表
        let productsExpanded = false;
        toggleProductsBtn.addEventListener('click', () => {
            productsExpanded = !productsExpanded;
            const productList = document.querySelector('.product-list');
            
            if (productsExpanded) {
                // 加载更多商品
                for (let i = 0; i < 4; i++) {
                    const randomId = 100 + i;
                    const discount = (Math.random() * 3 + 3).toFixed(1);
                    const originalPrice = Math.floor(Math.random() * 200) + 100;
                    const currentPrice = Math.floor(originalPrice * (discount / 10));
                    
                    const product = document.createElement('a');
                    product.className = 'product-item';
                    product.href = '#';
                    product.innerHTML = `
                        <img src="https://picsum.photos/id/${randomId}/300/300" alt="促销商品" class="product-image">
                        <div class="product-info">
                            <div class="product-name">夏季时尚单品 ${i+1} 百搭款式</div>
                            <div class="product-price">
                                <span class="current-price">¥${currentPrice}</span>
                                <span class="original-price">¥${originalPrice}</span>
                            </div>
                            <span class="product-tag">${discount}折</span>
                        </div>
                    `;
                    productList.appendChild(product);
                }
                toggleProductsBtn.innerHTML = '<span>收起</span><i class="fas fa-chevron-up"></i>';
            } else {
                // 只保留前4个商品
                const products = document.querySelectorAll('.product-item');
                for (let i = 4; i < products.length; i++) {
                    products[i].remove();
                }
                toggleProductsBtn.innerHTML = '<span>查看更多</span><i class="fas fa-chevron-down"></i>';
            }
        });
        
        // 评论排序
        let sortByLatest = true;
        sortCommentsBtn.addEventListener('click', () => {
            sortByLatest = !sortByLatest;
            if (sortByLatest) {
                sortCommentsBtn.innerHTML = '<span>最新</span><i class="fas fa-chevron-down"></i>';
                showToast('已切换为按最新排序');
            } else {
                sortCommentsBtn.innerHTML = '<span>最热</span><i class="fas fa-chevron-down"></i>';
                showToast('已切换为按最热排序');
            }
        });
        
        // 评论点赞
        document.addEventListener('click', (e) => {
            if (e.target.closest('.like-comment')) {
                const likeBtn = e.target.closest('.like-comment');
                const icon = likeBtn.querySelector('i');
                const countEl = likeBtn.querySelector('span');
                let count = parseInt(countEl.textContent);
                
                if (icon.classList.contains('far')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas');
                    likeBtn.classList.add('liked');
                    countEl.textContent = count + 1;
                    
                    // 更新总点赞数
                    let totalLikes = parseInt(likeCountEl.textContent);
                    likeCountEl.textContent = totalLikes + 1;
                } else {
                    icon.classList.remove('fas');
                    icon.classList.add('far');
                    likeBtn.classList.remove('liked');
                    countEl.textContent = count - 1;
                    
                    // 更新总点赞数
                    let totalLikes = parseInt(likeCountEl.textContent);
                    likeCountEl.textContent = totalLikes - 1;
                }
            }
            
            // 回复点赞
            if (e.target.closest('.like-reply')) {
                const likeBtn = e.target.closest('.like-reply');
                const icon = likeBtn.querySelector('i');
                const countEl = likeBtn.querySelector('span');
                let count = parseInt(countEl.textContent);
                
                if (icon.classList.contains('far')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas');
                    likeBtn.classList.add('liked');
                    countEl.textContent = count + 1;
                } else {
                    icon.classList.remove('fas');
                    icon.classList.add('far');
                    likeBtn.classList.remove('liked');
                    countEl.textContent = count - 1;
                }
            }
            
            // 回复评论
            if (e.target.closest('.reply-comment')) {
                const replyBtn = e.target.closest('.reply-comment');
                const commentId = replyBtn.getAttribute('data-id');
                const userName = replyBtn.closest('.comment-item').querySelector('.user-name').textContent;
                
                commentInput.focus();
                commentInput.value = `回复 @${userName}：`;
            }
            
            // 回复回复
            if (e.target.closest('.reply-reply')) {
                const replyBtn = e.target.closest('.reply-reply');
                const toUser = replyBtn.getAttribute('data-to');
                
                commentInput.focus();
                commentInput.value = `回复 @${toUser}：`;
            }
        });
        
        // 发送评论
        sendCommentBtn.addEventListener('click', () => {
            const commentText = commentInput.value.trim();
            if (commentText) {
                // 模拟发送评论
                showToast('评论成功');
                commentInput.value = '';
                
                // 更新评论数
                let commentCount = parseInt(commentCountEl.textContent);
                commentCountEl.textContent = commentCount + 1;
                
                // 在实际应用中，这里应该将评论发送到服务器
                // 并在成功后添加到评论列表顶部
            } else {
                showToast('请输入评论内容');
            }
        });
        
        // 评论输入框高度自适应
        commentInput.addEventListener('input', () => {
            // 重置高度
            commentInput.style.height = 'auto';
            // 设置新高度（最小40px，最大100px）
            const newHeight = Math.min(Math.max(40, commentInput.scrollHeight), 100);
            commentInput.style.height = `${newHeight}px`;
        });
        
        // 图片评论按钮
        imageCommentBtn.addEventListener('click', () => {
            showToast('请选择图片');
        });
        
        // 表情评论按钮
        emojiCommentBtn.addEventListener('click', () => {
            showToast('表情功能待开发');
        });
        
        // 加载更多评论
        loadMoreCommentsBtn.addEventListener('click', function() {
            this.innerHTML = '<span>加载中</span><i class="fas fa-spinner"></i>';
            this.classList.add('loading');
            
            // 模拟加载延迟
            setTimeout(() => {
                const commentsSection = document.querySelector('.comments-section');
                const loadMoreDiv = document.querySelector('.load-more');
                
                // 添加3条新评论
                for (let i = 0; i < 3; i++) {
                    const randomId = 30 + i;
                    const daysAgo = Math.floor(Math.random() * 5) + 1;
                    const likeCount = Math.floor(Math.random() * 50);
                    const hasImage = Math.random() > 0.7;
                    
                    let imageHtml = '';
                    if (hasImage) {
                        imageHtml = `
                            <div class="comment-images">
                                <div class="comment-image">
                                    <img src="https://picsum.photos/id/${40 + i}/100/100" alt="评论图片">
                                </div>
                            </div>
                        `;
                    }
                    
                    const comment = document.createElement('div');
                    comment.className = 'comment-item';
                    comment.innerHTML = `
                        <div class="comment-header">
                            <div class="comment-user">
                                <div class="user-avatar">
                                    <img src="https://picsum.photos/id/${randomId}/100/100" alt="用户头像">
                                </div>
                                <div class="user-name">用户${randomId}</div>
                            </div>
                            <div class="comment-time">${daysAgo}天前</div>
                        </div>
                        <div class="comment-content">
                            这次活动很给力，买了几件衣服，质量不错，价格也实惠，推荐大家购买！
                        </div>
                        ${imageHtml}
                        <div class="comment-actions">
                            <button class="comment-action like-comment" data-id="${10 + i}">
                                <i class="far fa-heart"></i>
                                <span>${likeCount}</span>
                            </button>
                            <button class="comment-action reply-comment" data-id="${10 + i}">
                                <i class="far fa-comment"></i>
                                <span>回复</span>
                            </button>
                        </div>
                    `;
                    
                    commentsSection.insertBefore(comment, loadMoreDiv);
                }
                
                // 恢复按钮状态
                this.innerHTML = '<span>加载更多评论</span><i class="fas fa-chevron-down"></i>';
                this.classList.remove('loading');
                
                showToast('已加载更多评论');
            }, 1500);
        });
        
        // 图片查看器
        promotionGallery.addEventListener('click', () => {
            openImageViewer(currentImageIndex);
        });
        
        // 打开图片查看器
        function openImageViewer(index) {
            currentImageIndex = index;
            viewerImage.src = galleryImages[currentImageIndex];
            viewerCount.textContent = `${currentImageIndex + 1}/${galleryImages.length}`;
            imageViewer.classList.add('active');
            document.body.style.overflow = 'hidden';
        }
        
        // 关闭图片查看器
        closeViewer.addEventListener('click', () => {
            imageViewer.classList.remove('active');
            document.body.style.overflow = 'auto';
        });
        
        // 图片查看器左右滑动切换图片
        let startX = 0;
        imageViewer.addEventListener('touchstart', (e) => {
            startX = e.touches[0].clientX;
        });
        
        imageViewer.addEventListener('touchend', (e) => {
            const endX = e.changedTouches[0].clientX;
            const diffX = endX - startX;
            
            // 滑动距离足够大才切换图片
            if (Math.abs(diffX) > 50) {
                if (diffX > 0) {
                    // 向右滑动，查看上一张
                    currentImageIndex = (currentImageIndex - 1 + galleryImages.length) % galleryImages.length;
                } else {
                    // 向左滑动，查看下一张
                    currentImageIndex = (currentImageIndex + 1) % galleryImages.length;
                }
                viewerImage.src = galleryImages[currentImageIndex];
                viewerCount.textContent = `${currentImageIndex + 1}/${galleryImages.length}`;
            }
        });
        
        // 倒计时功能
        function updateCountdown() {
            // 获取当前时间和活动结束时间
            const now = new Date();
            // 假设活动结束时间是3天后
            const endTime = new Date(now.getTime() + 3 * 24 * 60 * 60 * 1000);
            
            // 计算剩余时间
            const diff = endTime - now;
            if (diff <= 0) {
                countdownDays.textContent = '0';
                countdownHours.textContent = '0';
                countdownMinutes.textContent = '0';
                countdownSeconds.textContent = '0';
                return;
            }
            
            const days = Math.floor(diff / (1000 * 60 * 60 * 24));
            const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((diff % (1000 * 60)) / 1000);
            
            // 更新显示
            countdownDays.textContent = days;
            countdownHours.textContent = hours.toString().padStart(2, '0');
            countdownMinutes.textContent = minutes.toString().padStart(2, '0');
            countdownSeconds.textContent = seconds.toString().padStart(2, '0');
        }
        
        // 初始化倒计时
        updateCountdown();
        // 每秒更新一次倒计时
        setInterval(updateCountdown, 1000);
        
        // 提示消息功能
        function showToast(message) {
            toast.textContent = message;
            toast.classList.add('show');
            
            setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
    </script>
</body>
</html>

